# find_package() 命令会在模块路径中寻找 Find<name>.cmake。
# 首先 CMake 查看 ${CMAKE_MODULE_PATH} 中的所有目录，然后再查看它自己的模块目录 ${CMAKE_ROOT}/Modules/ 。
MESSAGE(STATUS "This is CMAKE_ROOT " ${CMAKE_ROOT})
MESSAGE(STATUS "This is PROJECT_SOURCE_DIR " ${CMAKE_MODULE_PATH})
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
MESSAGE(STATUS "This is PROJECT_SOURCE_DIR " ${CMAKE_MODULE_PATH})

FIND_PACKAGE(HELLO)
IF (HELLO_FOUND)
    ADD_EXECUTABLE(hello find.cpp)
    INCLUDE_DIRECTORIES(${HELLO_INCLUDE_DIR})
    TARGET_LINK_LIBRARIES(hello ${HELLO_LIBRARY})
ENDIF (HELLO_FOUND)